package com.learn.excel.core.util.shell;

/**
 * @Classname CommandWaitForThread
 * @Description TODO
 * @Author zxy
 */
public class CommandWaitForThread extends Thread {

	private Process process;
	private boolean finish = false;
	private int exitVale = -1;


	public void run() {
		try {
			this.exitVale = process.waitFor();
		} catch (InterruptedException e) {
			e.printStackTrace();
		} finally {
			finish = true;
		}
	}

	public CommandWaitForThread(Process process) {
		this.process = process;
	}

	public boolean isFinish() {
		return finish;
	}

	public void setFinish(boolean finish) {
		this.finish = finish;
	}

	public int getExitVale() {
		return exitVale;
	}
}
